import request from '@/utils/request'

// 获取管理员列表
export const getManagers = () => {
  return request({
    url: `/manager`,
    method: 'get'
  })
}

// 获取管理员
export const getManager = (id) => {
  return request({
    url: `/manager/${id}`,
    method: 'get'
  })
}

// 创建管理员
export const createManager = (data) => {
  return request({
    url: `/manager`,
    method: 'post',
    data
  })
}

// 修改管理员
export const updateManager = (id, data) => {
  return request({
    url: `/manager/${id}`,
    method: 'put',
    data
  })
}

// 删除管理员
export const removeManager = (id) => {
  return request({
    url: `/manager/${id}`,
    method: 'delete',
  })
}


export const login = (data) => {
  return request({
    url: `/manager/login`,
    method: 'post',
    data
  })
}



